import Mock from 'mockjs'

// /\/gqjcManage\/login/
Mock.mock(/\/mock\/gqjcManage\/sys\/login/, 'post', options => {
  return {
    code: 200,
    data: {
      subjectId: '1',
      token: Mock.mock('@guid')
    }
  }
})

// 菜单列表
Mock.mock(/\/mock\/gqjcManage\/sys\/menu\/nav/, 'get', options => {
  return [
    {
      menuId: '31',
      parentId: '0',
      parentName: null,
      name: '工作台',
      url: '/home',
      perms: '',
      type: 1,
      icon: 'manage',
      orderNum: 1,
      open: null,
      list: null,
      key: 'home',
      pageUrl: '/Home',
      subjectId: '1'
    },
    {
      menuId: '1',
      parentId: '0',
      parentName: null,
      name: '平台管理',
      url: null,
      perms: null,
      type: 0,
      icon: 'system',
      orderNum: 8,
      open: null,
      list: null,
      key: null,
      pageUrl: null,
      subjectId: '1'
    },
    {
      menuId: '3',
      parentId: '1',
      parentName: '平台管理',
      name: '角色管理',
      url: '/sys/role',
      perms: null,
      type: 1,
      icon: 'role',
      orderNum: 2,
      open: null,
      list: null,
      key: null,
      pageUrl: '/sys/Role',
      subjectId: '1'
    },
    {
      menuId: '4',
      parentId: '1',
      parentName: '平台管理',
      name: '菜单管理',
      url: '/sys/menu',
      perms: null,
      type: 1,
      icon: 'menu',
      orderNum: 3,
      open: null,
      list: null,
      key: null,
      pageUrl: '/sys/Menu',
      subjectId: '1'
    }
    // {
    //   menuId: '2',
    //   parentId: '1',
    //   parentName: '平台管理',
    //   name: '管理员列表',
    //   url: 'sys/user',
    //   perms: null,
    //   type: 1,
    //   icon: 'admin',
    //   orderNum: 1,
    //   open: null,
    //   list: null,
    //   key: null,
    //   pageUrl: null,
    //   subjectId: '1'
    // },
  ]
})
